<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 22/05/10
 * Time: 9:45
 */

namespace App\Services;

use Illuminate\Support\Facades\Log;

class ErrorMsgService
{
    /**
     *  记录错误日志信息，存放到 storage/logs/laravel.log
     * @param $exception
     * @param $url
     */
    public static function write($exception, $url)
    {
        Log::error('errorUrl : ' . $url);
        Log::error('errorFile: ' . $exception->getFile());
        Log::error('errorLine: ' . $exception->getLine());
        Log::error('errorMsg : ' . $exception->getMessage());
        Log::error('actionUser：' . user()->nickname);
        Log::info('--------------------------------');
    }
}
